import java.util.Arrays;

public class MostElements {

    public static int find(int[] arr) {
        int middle = arr.length / 2;
        Arrays.sort(arr);
        int ret = arr[middle];
        return ret;
    }

    public static void main(String[] args) {
        int[] arr = {2, 2, 3, 1, 1, 2, 2};
        int ret = find(arr);
        System.out.println(ret);
    }
}
